package com.fulu.game.bi.controller.market;

import com.fulu.game.bi.common.controller.BaseController;
import com.fulu.game.bi.entity.po.roi.NewAddUserStat;
import com.fulu.game.bi.entity.vo.Result;
import com.fulu.game.bi.entity.vo.market.NewAddUserQueryVO;
import com.fulu.game.bi.redis.service.market.NewAddUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 *  市场、增长 - 新增用户
 */
@RequestMapping("/api/v1/new-add-user")
@RestController
public class NewAddUserController extends BaseController {

    @Autowired
    private NewAddUserService newAddUserService;

    /**
     * 列表查询
     */
    @PostMapping("/query")
    public Result<List<NewAddUserStat>> query(NewAddUserQueryVO vo) {
        List<NewAddUserStat> list = newAddUserService.list(vo);
        return Result.success().data(list).msg("查询成功");
    }

    /**
     * 导出查询
     */
    @PostMapping("/export")
    public void export(NewAddUserQueryVO vo) {
        newAddUserService.export(vo);
    }
}
